#ifndef IMAGEMODEL_H
#define IMAGEMODEL_H

#include <QAbstractTableModel>
#include <QDomDocument>
#include "imagemanager.h"

class ImageModel : public QAbstractTableModel
{
    Q_OBJECT
    ImageManager *m_manager;
public:
    explicit ImageModel(ImageManager* manager, QObject *parent = 0);
    int rowCount(const QModelIndex & parent = QModelIndex()) const;
    int columnCount(const QModelIndex & parent = QModelIndex()) const;
    QVariant data ( const QModelIndex & index, int role = Qt::DisplayRole ) const;
    QVariant headerData ( int section, Qt::Orientation orientation, int role = Qt::DisplayRole ) const;
    bool setData(const QModelIndex &index, const QVariant &value, int role = Qt::EditRole);
    Qt::ItemFlags flags(const QModelIndex &index) const;
    void Update();
signals:

public slots:
    int LoadImageK(const QString &path);
    void EraseImage(int index);
    AED_Image* GetImage(int index);

    bool Load(QDomElement &header, QString &scene_path);

};

#endif // IMAGEMODEL_H
